-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update templates to calculate rnwPath for *.sln files #13572
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@shirakaba I believe this PR should alleviate some of the roadblocks in your expo+monorepo work. |
Fantastic, thank you so much! |
acoates-ms
approved these changes
Aug 19, 2024
jonthysell
added a commit
to jonthysell/react-native-windows
that referenced
this pull request
Aug 26, 2024
This PR backports microsoft#13572 to 0.75. ## Description Visual Studio solution files cannot use variables in paths to the various project files, and up until now the paths to RNW projects assumed a simple app repo, and were hardcoded to `..\node_modules\react-native-windows\`. This PR changes the templates for both new and old architecture projects to instead inject the calculated actual path to the RNW package. **Note:** Node does not "see" symlinks, only their resolved path. So if you're getting RNW via a symlink (say through yarn link) the sln file will hardcode the resolved path at the time of creation. ### Type of Change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ### Why Some user feedback has indicated that the hardcoded paths did not work for monorepos which may have multiple packages depending on RNW. ### What See above. ## Screenshots N/A ## Testing Verified that the path is now generated. ## Changelog Should this change be included in the release notes: _yes_ Update templates to calculate rnwPath for *.sln files
jonthysell
added a commit
to jonthysell/react-native-windows
that referenced
this pull request
Aug 26, 2024
This PR backports microsoft#13572 to 0.74. ## Description Visual Studio solution files cannot use variables in paths to the various project files, and up until now the paths to RNW projects assumed a simple app repo, and were hardcoded to `..\node_modules\react-native-windows\`. This PR changes the templates for both new and old architecture projects to instead inject the calculated actual path to the RNW package. **Note:** Node does not "see" symlinks, only their resolved path. So if you're getting RNW via a symlink (say through yarn link) the sln file will hardcode the resolved path at the time of creation. ### Type of Change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ### Why Some user feedback has indicated that the hardcoded paths did not work for monorepos which may have multiple packages depending on RNW. ### What See above. ## Screenshots N/A ## Testing Verified that the path is now generated. ## Changelog Should this change be included in the release notes: _yes_ Update templates to calculate rnwPath for *.sln files
jonthysell
added a commit
that referenced
this pull request
Aug 26, 2024
This PR backports #13572 to 0.75. ## Description Visual Studio solution files cannot use variables in paths to the various project files, and up until now the paths to RNW projects assumed a simple app repo, and were hardcoded to `..\node_modules\react-native-windows\`. This PR changes the templates for both new and old architecture projects to instead inject the calculated actual path to the RNW package. **Note:** Node does not "see" symlinks, only their resolved path. So if you're getting RNW via a symlink (say through yarn link) the sln file will hardcode the resolved path at the time of creation. ### Type of Change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ### Why Some user feedback has indicated that the hardcoded paths did not work for monorepos which may have multiple packages depending on RNW. ### What See above. ## Screenshots N/A ## Testing Verified that the path is now generated. ## Changelog Should this change be included in the release notes: _yes_ [0.75] Update templates to calculate rnwPath for *.sln files
jonthysell
added a commit
that referenced
this pull request
Aug 26, 2024
This PR backports #13572 to 0.74. ## Description Visual Studio solution files cannot use variables in paths to the various project files, and up until now the paths to RNW projects assumed a simple app repo, and were hardcoded to `..\node_modules\react-native-windows\`. This PR changes the templates for both new and old architecture projects to instead inject the calculated actual path to the RNW package. **Note:** Node does not "see" symlinks, only their resolved path. So if you're getting RNW via a symlink (say through yarn link) the sln file will hardcode the resolved path at the time of creation. ### Type of Change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ### Why Some user feedback has indicated that the hardcoded paths did not work for monorepos which may have multiple packages depending on RNW. ### What See above. ## Screenshots N/A ## Testing Verified that the path is now generated. ## Changelog Should this change be included in the release notes: _yes_ [0.74] Update templates to calculate rnwPath for *.sln files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Visual Studio solution files cannot use variables in paths to the various project files, and up until now the paths to RNW projects assumed a simple app repo, and were hardcoded to
..\node_modules\react-native-windows\
.This PR changes the templates for both new and old architecture projects to instead inject the calculated actual path to the RNW package.
Note: Node does not "see" symlinks, only their resolved path. So if you're getting RNW via a symlink (say through yarn link) the sln file will hardcode the resolved path at the time of creation.
Type of Change
Why
Some user feedback has indicated that the hardcoded paths did not work for monorepos which may have multiple packages depending on RNW.
What
See above.
Screenshots
N/A
Testing
Verified that the path is now generated.
Changelog
Should this change be included in the release notes: yes
Update templates to calculate rnwPath for *.sln files
Microsoft Reviewers: Open in CodeFlow